﻿@model RegisterModel
@{
    ViewBag.Title = "Register";
}

<div class="container-fluid" style="width:80%;margin: 0 auto;" >
  @using (Html.BeginForm("doregister", "login", FormMethod.Post, new { @class = "form-horizontal" }))
  {
    @Html.ValidationSummary(true, "帐户创建不成功。请更正错误并重试。")
    <div>
        <fieldset>
            <legend>帐户信息</legend> 
            <div class="control-group">
              <label class="control-label" >用户名：</label>
                <div class="controls">
                @Html.TextBoxFor(m => m.UserName)
                <p class="help-block">@Html.ValidationMessageFor(m=>m.UserName)</p>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label" >电子邮件地址：</label>
                <div class="controls">
                @Html.TextBoxFor(m => m.Email)
                <p class="help-block">@Html.ValidationMessageFor(m => m.Email)</p>
              </div>
            </div>

            <div class="control-group">
              <label class="control-label" >密码：</label>
                <div class="controls">
                @Html.PasswordFor(m => m.Password)
                <p class="help-block">@Html.ValidationMessageFor(m => m.Password)</p>
              </div>
            </div>

            <div class="control-group">
              <label class="control-label" >确认密码：</label>
                <div class="controls">
                @Html.PasswordFor(m => m.ConfirmPassword)
                <p class="help-block">@Html.ValidationMessageFor(m => m.ConfirmPassword)</p>
              </div>
            </div>

            <div class="form-actions">
            <button type="submit" class="btn btn-primary">注册</button>
             @ViewBag.msg
          </div>
        </fieldset>
    </div>
  }
</div>
@section scripts{
    @Scripts.Render("~/js/jqueryval")
}
